<template>
  <div class="app-container">
    <!-- 转账记录搜索栏 -->
    <el-form
      :model="queryParams"
      ref="queryForm"
      v-show="showSearch"
      :inline="true"
    >
      <!-- <el-form-item label="代理商ID" prop="proxyId">
        <el-input
          v-model="queryParams.proxyId"
          placeholder="请输入代理商id"
          clearable
          size="small"
          style="width: 240px"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="商家id" prop="shopId">
          <el-input  v-model="queryParams.shopId" placeholder="请输入商家id" clearable size="small" @keyup.enter.native="handleQuery"/>
      </el-form-item> -->
      <el-form-item label="代理商名称" prop="proxyName">
        <el-input v-model="queryParams.proxyName" placeholder="请输入代理商名称" clearable size="small" @keyup.enter.native="hanleQuery"/>
      </el-form-item>
      <el-form-item label="商家名称" prop="shopName">
          <el-input  v-model="queryParams.shopName" placeholder="请输入商家名称" clearable size="small" @keyup.enter.native="handleQuery"/>
      </el-form-item>

      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>
<!-- 转账记录列表栏-->
    <el-table
      v-loading="loading"
      :data="transferList"
    >
      <el-table-column label="代理商名称(转)" prop="proxyName"/>
      <el-table-column label="商家名称(收)" prop="shopName"/>
      <el-table-column label="发送播放量(次)" prop="videoCount"/>
      <el-table-column label="发送时间" prop="createTime"/>
      <el-table-column label="备注" prop="remark"/>
    </el-table>

    <pagination
      v-show="total > 0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />
  </div>
</template>

<script>
import {transferlist} from "@/api/transfer/transfer";

export default {
  data() {
    return {
      //总条数
      total: 0,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
      },
      //视频列表数据
      transferList: [],
      // 状态数据字典
      statusOptions: [],
      // 显示搜索条件
      showSearch: true,
    };
  },
    created() {
    this.getList();
    // this.getDicts("sys_normal_disable").then((response) => {
    //   this.statusOptions = response.data;
    // });
  },
    methods: {
     /** 重置按钮操作 */
        resetQuery() {
            this.dateRange = [];
            this.resetForm("queryForm");
            this.handleQuery();
        },
    /** 搜索按钮操作 */
        handleQuery() {
            this.queryParams.pageNum = 1;
            this.getList();
        },
    /** 查询视频发送列表 */
        getList() {
            this.loading = true;
            transferlist(this.queryParams).then((response) => {
                this.transferList = response.rows;
                this.total = response.total;
                this.loading = false;
        });
        },
    }
};
</script>

<style>
</style>
